package com.student.student.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 用户服务Feign客户端
 * 
 * @author student
 * @date 2025
 */
@FeignClient(name = "user-service")
public interface UserServiceClient {
    
    /**
     * 创建用户（简化接口）
     */
    @PostMapping("/api/user/create-simple")
    boolean createUser(@RequestParam("username") String username,
                      @RequestParam("realName") String realName,
                      @RequestParam("role") String role,
                      @RequestParam("relatedId") String relatedId,
                      @RequestParam("email") String email,
                      @RequestParam("phone") String phone);
    
    /**
     * 更新用户信息（简化接口）
     */
    @PutMapping("/api/user/update-info-simple")
    boolean updateUserInfo(@RequestParam("username") String username,
                          @RequestParam("realName") String realName,
                          @RequestParam("email") String email,
                          @RequestParam("phone") String phone);
    
    /**
     * 删除用户（简化接口）
     */
    @DeleteMapping("/api/user/delete-simple")
    boolean deleteUser(@RequestParam("username") String username);
}
